Interpolation of images

ABSTRACT

In a method of interpolating sample values (f) of samples (Pi, Pot) of an image, a direction of a local gradient ( 8 ) of the sample values (f) for a particular one of the samples (Pi, Pot) is determined ( 1 ) from sample values (f) neighboring the particular one of the samples (Pi, Pot). The positions of interpolator input values (ai) are selected ( 20 ) in the direction of the local gradient ( 8 ) of the particular one of the samples (Pi, Pot). The interpolator input values (ai) for the particular one of the samples (Pi, Pot) are interpolated ( 21 ) from pixel values (f) neighboring the interpolator input values (ai). And, a warping factor (A) for a warped distance interpolating ( 3 ) is determined ( 22 ) using the interpolator input values (ai).

FIELD OF THE INVENTION

The invention relates to a method of interpolating pixel values ofpixels of an image. The invention further relates to a warped distanceinterpolator, and to a display apparatus comprising such a warpeddistance interpolator.

BACKGROUND OF THE INVENTION

The warped distance concept (WaDi) is known from the publication “Warpeddistance for space-variant linear image interpolation”, IEEETransactions on Image processing, vol. 8 no. 5, May 1999 by G. Ramponi.The Warped Distance concept for linear interpolators adapts a linearinterpolator to the local pixel configuration of natural (non graphic)images. Particularly, the aim was to prevent edges from being blurred bythe interpolation process.

The WaDi concept performs a one dimensional interpolation. In thehorizontal direction, an interpolated sample could be a linearcombination of the two neighboring horizontal samples sandwiching thesample to be interpolated. The linear combination depends on thefractional position (or phase) of the sample to be interpolated withrespect to the two neighboring horizontal samples. The interpolation ata luminance edge is adapted by locally warping the phase, such that thesample to be interpolated is virtally moved toward the right or leftinput sample. This warping is stronger in presence of luminance edgesand less on smooth parts. In order to determine the amount of warping,four pixels around the one that has to be interpolated are analyzed, andan asymmetry value is computed such that the sample to be interpolatedis moved towards the flat area it belongs to.

An interpolation of a 2D image is obtained by first performing the WaDialgorithm on the input samples in the horizontal direction to obtaininterpolated horizontal samples and then in the vertical direction onthe interpolated horizontal samples. It is a disadvantage that arelatively complex algorithm is required.

SUMMARY OF THE INVENTION

It is an object of the invention to perform a WaDi interpolation on atwo-dimensional image which provides a higher performance algorithm.

A first aspect of the invention provides a method of interpolatingsample values of samples of an image as claimed in claim 1. A secondaspect of the invention provides a warped distance interpolator asclaimed in claim 7. A third aspect of the invention provides a displayapparatus as claimed in claim 8. Advantageous embodiments in accordancewith the invention are defined in the dependent claims.

The method of interpolating sample values of samples of an imagedetermines a direction of a local gradient for a particular one of thesamples from sample values neighboring the particular one of thesamples. This local gradient indicates the direction of change of thevalues of the samples at the position of the particular sample. Forexample if the image comprises a white left area and a black right areaand the particular sample is near to a vertical border between the whiteand the black area, the gradient will direct in the horizontal directiontowards the white area. Usually, the local gradient is determined foreach output sample of the image.

Then, a warping factor for a warped distance interpolator WaDi isdetermined using interpolator input values arranged in the gradientdirection of the particular sample. Thus, the interpolator input valuesfor the well known WaDi interpolator are selected on a line whichextends through the particular sample in the direction of the localgradient.

Because usually, these interpolator input values do not coincide withthe input samples, the interpolator input values have to be interpolatedfrom input sample values neighboring the interpolator input values.

The determination of the warping factor in the direction of the localgradient has the advantage that the WaDi interpolation can be performedin one step, instead of performing the WaDi interpolation stepsuccessively in the horizontal and vertical direction.

In an embodiment in accordance with the invention as defined in claim 2,the WaDi interpolation is applied in a system in which an output imageis a scaled input image. This approach is particularly interesting forscaling factors which are at least 2, which means that the distancebetween the output samples is at most half of the distance between inputsamples. The distance may refer to the time elapsed between twosuccessive samples or to the actual position on a display screen whenthese samples are displayed on the pixels of the display screen.

In this embodiment, the output image is first roughly interpolated fromthe input image to obtain raw interpolated data, for example by using asimple bilinear interpolator. The resultant low-pass version of theimage makes the gradient estimation less susceptible to noise. A morecomplex interpolation, for example a cubic interpolation, may be usedbut has the drawback that a higher computational complexity results. Thelocal gradient is determined by using the output pixels or rawinterpolated data supplied by the simple interpolator.

In the embodiment in accordance with the invention as defined in claim3, the local gradient is determined in the input map by using the inputsample values. The local gradients found are mapped to output samplepositions of the output samples in the output map. This mapping may beperformed, for example, by using the nearest neighbor approach, or bylinear interpolation. This approach does not require the rawinterpolation step and thus takes less computational effort.

In the embodiment in accordance with the invention as defined in claim4, the samples are arranged in a matrix in which the position of thesamples is defined by the orthogonal x, y coordinates. Well known Sobelfilters are used to estimate the direction of the local gradient.

In the embodiment in accordance with the invention as defined in claim5, the distance between the adjacent interpolator input values used todetermine the gradient is substantially equal to the distance betweenadjacent input samples to provide a coherent interpolation.

In the embodiment in accordance with the invention as defined in claim6, the warping factor is projected on the x and y coordinates to controlthe WaDi interpolator to modify the distances (to warp the samples inthe time domain or the pixels in the space domain) in the x and in the ydirection in accordance with the projected warping actors. Thus, insteadof performing the standard WaDi algorithm two times, first in the xdirection to obtain intermediate results, and then in the y directionusing the intermediate results, the components of the single warpingfactor are used to directly obtain the interpolated output samples fromthe input samples.

These and other aspects of the invention are apparent from and will beelucidated with reference to the embodiments described hereinafter.

BRIEF DESCRIPTION OF THE DRAWINGS

In the drawings:

FIG. 1 shows a known two step interpolation approach,

FIG. 2 shows a waveform for elucidating the known Warped Distanceconcept,

FIG. 3 shows, for a particular output sample, the arrangement of theinterpolator input values in the direction of the local gradient inaccordance with an embodiment of the invention,

FIG. 4 shows a flowchart for elucidating an embodiment of the one stepWarped Distance concept in accordance with the invention,

FIG. 5 shows a flowchart of part of another embodiment of the one stepWarped Distance concept in accordance with the invention, and

FIG. 6 shows a block diagram of a display apparatus comprising theWarped Distance interpolator in accordance with the invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

FIG. 1 shows a prior art two step interpolation approach.

In well known linear interpolation techniques, a two-dimensional inputimage II (see FIG. 6) is represented by input samples Pi which usuallyare sampled equidistant such that the input samples Pi are positioned ona rectangular grid which has a x and a y direction. The input samples Piare also referred to as input pixels Pi which is based on the fact thatif the input samples Pi were displayed on a display screen DS (see FIG.6), the rectangular grid in time would show as a rectangular grid inposition on the display screen DS. The values of the input samples Pidetermine the intensity of the input pixels Pi. The output samples Poactually to be displayed on the display screen DS may have to beinterpolated from the input samples Pi to obtain output pixels Pocorresponding to the pixels on the display screen DS. This is forexample required if the resolution of the display screen DS is fixed,such as is the case for matrix displays and the resolution of the inputimage II differs from the resolution of the display screen DS.

FIG. 1 shows the interpolation of an output sample Po which ispositioned in-between input samples Pi. The value of the i-th inputsample Pi of the j-th row of samples of the input image is denoted byf(x_(i),y_(j)). The value of the output sample Po is denoted by fo(x,y).In FIG. 1 the four input samples Pi are shown which are nearest to theoutput sample Po.

First, the input image II is interpolated in the horizontal direction x.In the row y_(j), the value ft(x,y_(j)) of a temporary sample Pt1 isdetermined using the value f(x_(i),y_(j)) of the input sample Pi in thecolumn x_(i) and the value f(x_(i+1),y_(j)) of the input sample Pi inthe column x_(i+1). In the same manner, in the row y_(j+1), the valueft(x,y_(j+1)) of a temporary sample Pt2 is determined using the valuef(x_(i),y_(j+1)) of the input sample Pi in the column x_(i) and thevalue f(x_(i+1),y_(j+1)) of the input sample Pi in the column x_(i+1).Then, the value fo(x,y) of the output pixel Po is determined using thetemporary samples Pt1 and Pt2.

The values of the temporary samples Pt1 and Pt2 may be calculated asft(x,y _(k))=(1−S _(x))f(x _(i) ,y _(k))+S _(x) f(x _(i+1) ,y _(k))k=j,j+1  (1)wherein S_(x) is the distance in the x-direction between x and x_(i).

The value of the output sample Po may be calculated asfo(x,y)=(1−S _(y))ft(x,y _(j))+Sy ft(x,y _(j+1))  (2)wherein S_(y) is the distance in the y-direction between y and y_(j).

FIG. 2 shows a waveform for elucidating the known Warped Distanceconcept In the same manner as elucidated with respect to FIG. 1, theWarped Distance concept (further referred to as WaDi) determines thevalue of the output sample Po in two steps. The difference with thelinear interpolation elucidated with respect to FIG. 1 is that thedistances S_(x) and S_(y) are adapted (warped) according to a localfeature of the input image II to increase the perceived quality of theinterpolated output image OI (see FIG. 6). Thus, the WaDi interpolatesthe input image II by applying first the linear interpolation algorithmin the x-direction with an adapted distance S_(x) to obtain temporary orintermediate interpolated samples Pt. Then, the WaDi applies the linearinterpolation algorithm in the y-direction on the intermediateinterpolated samples Pt with an adapted distance S_(y) to obtain theoutput sample Po.

The WaDi warps the distances S_(x) and S_(y) based on de warping factorA:A=(|a3−a1|−|a4−a2|)/(L−1)  (3)wherein the coefficients a1 to a4 are input sample values f(xi,yj) inthe neighborhood of the output sample Po to be interpolated. Dependingon the step performed by the WaDi, the input samples a1 to a4 arearranged either in the x or in the y direction. L is the number oflevels available to display the samples, for example, for 8 bitluminance signals, L=256.

FIG. 2 shows a waveform and input samples Pi for elucidating the WaDi inthe x-direction. The function f(x) shows an example of a transition inthe input video image II.

Particularly, the aim of the WaDi was to prevent edges from beingblurred by the interpolation process. If the intermediate sample Pt tobe interpolated is in a position u (not shown) in the output domain, thecorresponding position of the output sample Po in the input domain isx=u/z, wherein z is the scaling factor. The input domain comprises theinput pixels Pi and the output domain comprises the output pixels Po.The fractional position or phase Sx=x−x₀, wherein x₀ is the left handinput sample Pi next to x. This input sample Pi at xo has a sample valuea2, the input sample Pi at x₁ has the value a3, the input sample Pi atx⁻¹ has the value a1 and the input sample Pi at x₂ has the value a4which is 1 in the examples shown. If a simple tent (bilinear) kernel isapplied as the base kernel of the linear interpolator of the WaDi, theoutput value would be:ft(x)=(1−Sx)f(x ₀)+Sxf(x ₁)=(1−Sx)a2+Sxa3  (4)wherein x₁ is the right hand input sample next to x.

Generally speaking, the interpolated sample ft(x) is a linearcombination of the neighboring samples f(x_(o)) and f(x₁), which linearcombination depends on the fractional position (or phase) Sx. Theinterpolation at a luminance edge is adapted by locally warping thephase Sx, such that x is virtually moved toward the right or left inputsample Pi. This warping is stronger in presence of luminance edges andless in smooth parts. In order to determine the amount of warping, thefour samples Pi at positions x⁻¹, x₀, x₁ and x₂ around the sample atposition x that has to be interpolated are analyzed, and an asymmetryvalue or warping factor A is computed: $\begin{matrix}\begin{matrix}{A = \frac{{{{f\left( x_{1} \right)} - {f\left( x_{- 1} \right)}}} - {{{f\left( x_{2} \right)} - {f\left( x_{0} \right)}}}}{L - 1}} \\{= \frac{{{{a\quad 3} - {a\quad 1}}} - {{{a\quad 4} - {a\quad 2}}}}{L - 1}}\end{matrix} & (5)\end{matrix}$wherein L is the number of allowed luminance levels (256 in case of8-bit quantization). And x⁻¹ is the input sample preceding the inputsample x₀, and x₂ is the input sample succeeding the input sample x₁.Provided the sigmoidal edge model applies, the asymmetry value A inequation (5) is 0 when the edge is perfectly symmetric, and close to 1(or −1) when the edge is more flat in the right (left) hand side of thesample Pt.

The sample Pt to be interpolated should be moved towards the flat areait belongs to. Therefore, when the warping factor A>0, the phase Sx hasto be increased, while if the warping factor A<0 the phase Sx has to bedecreased. This is obtained by the following warping function:Sx′=Sx−kASx(Sx−1)  (6)where k is the general amount of warping which may be controllable. Thewarped phase Sx′ remains in the range [0,1], if k is in the range [0,1].It has to be noted that the two extremes Sx=0 and Sx−1 are maintained(Sx′=0 and Sx′=1, respectively), regardless the value of A and k. Thewarped intermediate sample is indicated as WP.

In the same manner as elucidated for determining the warped intermediatesamples WP by performing the known WaDi in the x direction, the WaDi hasto interpolate the warped intermediate samples WP in the y-direction toobtain the output sample Po.

Changing the phase Sx is equivalent to moving the position of the sampleto be interpolated Pt or Po in the intermediate or output grid,respectively, before applying the linear filter equation of the WaDi, asif it were warped. Actually, the final position of the samples Pt or Pois not changed, the algorithm assigns to the sample to be interpolatedPt or Po the value obtained as if it were in the warped position. Thefactor k controls the amount of warping, a greater value of k increasesthe sharpening effect. To be sure that the phase Sx lies within theinterval 0 to 1, the factor k has to be selected ≦1. But, for naturalimages, the factor k is preferably larger than 1. Because |A| is usuallysmall, even at these larger factors k the phase Sx is still smallerthan 1. If the phase Sx becomes larger than 1 it is clipped to 1, or ifit becomes smaller than 0 it is clipped to 0.

In an embodiment in accordance with the invention, compared to the knownWaDi, the warping function is determined only once, in the direction ofa local gradient (θ) in either the input image or the output image.

FIG. 3 shows, for a particular output sample, how the interpolator inputvalues a1 to a4 may be arranged in the direction of the local gradientin accordance with an embodiment of the invention. The input samples Piare indicated by the large dots spaced over distance d in the x, yspace. The output samples Po are indicated by the intersections of thehorizontal and vertical lines which form the output grid. FIG. 3 thusshows, by way of example, a scaling with a factor 2. The line TRindicates the border between a black area (at the left hand side of theborder TR) and a white area. The direction of the local gradient at theposition of the output pixel P is indicated by the dotted line DLG whichis perpendicular to the border TR.

The invention is based on changing the phases Sx and Sy, not accordingto local 1-dimensional features in the x or the y direction,respectively, but from 2-dimensional features. Thus, the warping factorA is calculated in one step along the local gradient direction θ whichmay be diagonal. It is not required to determine a factor A separatelyin the x-direction and in the y-direction.

As discussed with respect to the known WAiD the asymmetry value orwarping factor A is still calculated by using input values a1 to a4which are positioned in the neighborhood of the output sample P of whichthe value has to be determined. But, in accordance with an embodiment ofthe invention, these input values are neither the input samples Pi inthe x-direction nor the warped temporary samples Pt in the y-direction.Now, the input values a1 to a4 are arranged in the direction of a localgradient θ. As shown in FIG. 3, the input values a1 to a4 used todetermine the warping factor A are positioned on the line DLG, thus inthe direction of the local gradient θ. Usually, these input values a1 toa4 will not coincide with input samples Pi and thus will have to beinterpolated from the input samples Pi. Preferably, the distance dbetween two successive ones of the input values a1 to a4 is equal to thesampling period of the samples Pi of the input image II to keepcoherence with the image interpolation stage.

This sampling period corresponds to the distance d between twosuccessive input samples Pi in either the x or the y direction. Forexample, the input values a1 to a4 are obtained by a bilinearinterpolation in the positions shown in FIG. 3. These positions of theinput values a1 to a4 are selected along the maximum gradient directionθ, at distances −1.5·d, −0.5·d, 0.5·d, 1,5·d, respectively, from the(xp,yp) position of the output pixel P to be interpolated, wherein d isthe distance between two successive input pixels Pi in the input grid.The coordinates x and y of the input values a1 to a4 are determined withthe following equations:x=x _(p)+(i−2.5)d·cos(θ)y=y _(p)+(i−2.5)d·sin(θ)wherein i is the index of the input value a₁.

Two possible embodiments are elucidated for determining the localgradient θ. In the first embodiment, the input image II is firstinterpolated with a known algorithm, for example with a bilinear filter,to obtain roughly interpolated output samples. The local gradient θ isdetermined in the output domain from these output samples. For example,by using a Sobel filter. Possible masks of Sobel filters to obtain avalue of the directional derivative along x and y directions are:${Sobel}_{x} = \begin{pmatrix}{1/4} & 0 & {{- 1}/4} \\{1/2} & 0 & {{- 1}/2} \\{1/4} & 0 & {{- 1}/4}\end{pmatrix}$ ${Sobel}_{y} = \begin{pmatrix}{{- 1}/4} & {{- 1}/2} & {{- 1}/4} \\0 & 0 & 0 \\{1/4} & {1/2} & {1/4}\end{pmatrix}$

The direction of the gradient θ at the position x_(i),y_(j) is thenestimated as follows:θ(x ₁ ,y _(j))=arctan((f1*Sobel_(y))|(x ₁ ,y _(j))/(f1*Sobel_(x))|(x ₁,y _(j)))  (7)wherein f1 is the result of the rough interpolation of the input imageII, and θ is an angle which varies between −π/2 and π/2.

The gradient evaluation has been performed by using Sobel's method inthe output domain. A pre-processing, for example a simple bilinearinterpolator, is required to obtain raw interpolated output sampleswhich represent a low-pass version of the input image II and thus thegradient estination is less noise-sensitive. The rough interpolation maybe performed with more complex methods, for example, such as a bicubicinterpolation, which of course has the drawback that a highercomputational complexity is required but which provides better gradientvalues θ. Although this first embodiment provides a very good gradientestimate, it adds a considerable overhead to the total processing time.

In another embodiment, a less optimal solution to estimate the gradientθ is to apply the Sobel filters in the input domain (using the inputsamples Pi) and then map these gradient values to the output grid. Thismapping may be performed, for example, by using the nearest neighborapproach, or by linearly interpolating the estimated gradient values θ.

If very high values of the interpolation factor are required, the passband of Sobel filter could become too large and the gradient estimationwould not work. For high interpolation factors, it is thus better toresize the image in two steps, performing the whole algorithm twice. Forexample, an interpolation by a factor of 8 may become an interpolationby a cascade of interpolations by a factor of 2. Alternatively, theSobel filters may be used to process a mid-resolution version of theinput image II to obtain gradient values θ. The same gradient values θare assigned to a group of output pixels Po in the ultra-high resolutionoutput grid.

FIG. 4 shows a flowchart for elucidating an embodiment of the one stepWarped Distance concept in accordance with the invention.

The step 1 receives the input samples Pi(i,j) and supplies localgradients θ(m,n) (also referred to as gradients). In the firstembodiment as elucidated before, the step 10 interpolates the inputpixels Pi(i,j) to obtain estimated output samples I′(m,n) which areinputted into the Sobel_(x) filtering step 11 and the Sobel_(y)filtering step 12. In the dividing step 13, the output of the Sobel_(y)filtering step 12 is divided by the output of the Sobel_(x) filteringstep 11. Step 14 determines the gradient θ(m,n) by calculating thearctan of the output of the dividing step 13.

The step 2 performs the local asymmetry estimation also referred to asthe determination of the warping factor A. In step 20, the four inputvalues a1 to a4 are selected to be determined in positions along thedirection of the local gradient θ, thus on the line DLG. P(m,n) is theoutput sample of which the value has to be interpolated, and θ(P) is thelocal gradient at the position of this output sample P(m,n). In step 21,the values of the input values a1 to a4 are determined by interpolationof the input samples Pi surrounding the positions of the input values a1to a4. Preferably, a bilinear interpolation is used. In step 22, thewarping factor A is determined according to equation 5 in one step fromthe interpolated input values a1 to a4.

The step 3 determines the values of the output samples Po(i,j). Step 30receives the gradients θ(m,n) and the warping factor A to compute thelocal warping components or distances SL_(x) and Sl_(y) by warping thedistances S_(x) and S_(y) in the same manner as equation 6 did for theknown WaDi approach. To obtain the result, the warping vector A isprojected onto the x and y direction. The following equations performthese operations:SL _(x) =S _(x) +kA cos (θ)/4  (8)SL _(y) =S _(y) +kA sin (θ)/4  (9)

As in the known WaDi approach, k is a multiplying factor that adjuststhe distortion intensity, θ is the angle which defines the gradientdirection. The optional factor 4 at the denominator is provided only forcomparison with the known WaDi results. Note that the k factor can bevaried on a sample-per-sample (or if referring to the output pixels on apixel by pixel) basis, by means of an (external) automatic control. Forexample, a natural content detector can be used to estimate theprobability whether the local pixel is part of a photograph. Dependingon this estimate the warping effect can be tuned via the k factor toobtain the best result.

The optional clipping step 31 clips the values of the local warpingdistances SLx and Sly to keep them in a range from zero to one,including the limits. Otherwise, it may happen, especially if themultiplying factor k>4, that the warping distances SLx or SLy aresmaller than zero or greater than one which means that the output pixelPo to be interpolated would move outside the square formed by the fournearest input pixels Pi, which will not provide a good interpolation.The clipped warping distances are denoted by SLCx and SLCy.

It has to be noted that based on equations 8 and 9, that if the phaseSx=0 and the phase Sy=0, and if A is not zero, the warping distances SLxand SLy may not be equal to zero. Thus, output pixels Po(m,n)interpolated in points of the output grid that correspond to points inthe input grid may have a value different from the corresponding inputsamples Pi(i,j). Therefore, the adapted WaDi algorithm in accordancewith the invention is an approximate interpolation algorithm.

The interpolation step 32 interpoltes the input samples Pi(i,j) with aninterpolator which preferably uses a linear kernel. The clipped warpingdistances SLCx and SLCy determine how the output sample Po(m,n) has tobe interpolated by weighting the adjacent input samples Pi(i,j) in thesame manner as in the know WaDi.

The warped position x′,y′ in which the value f(x′,y′) of the outputsample or pixel Po(x,y) has to be evaluated is influenced by threefactors:

the coordinates x,y of the output pixel Po we are interpolating,

the direction θ of the local gradient which constrans the position ofthe input values ai used to calculate the warping factor A, and

the value of the warping strength parameter k.

FIG. 5 shows a flowchart of part of another embodiment of the one stepWarped Distance concept in accordance with the invention. FIG. 5 showsthe steps required in the step 1 which determines the direction of thelocal gradient θ(m,n) in accordance with the second embodiment discussedbefore. Now, step 1 comprises the steps 15 and 16 instead of the steps10 to 14 shown in FIG. 4. In step 15, the direction of the localgradients θ(i,j) is determined in the input image II for the inputsamples Pi. The step 16 maps these local gradients θ(i,j) from the inputdomain to the output domain to obtain local gradients θ(m,n) for theoutput pixels Po. The other steps of the WaDi processing of thisembodiment in accordance with the invention are equal to the steps shownin FIG. 4.

FIG. 6 shows a block diagram of a display apparatus comprising theWarped Distance interpolator in accordance with the invention. An inputvideo processor IVP processes input video IV to obtain the input imageII comprising the input samples Pi. If the input video IV comprises thethree RGB signals, the input video processor IVP may comprise a matrixfor determining the luminance value. The scaler WI comprises the WaDiinterpolator in accordance with the invention which is the known WaDiinterpolator which is adapted to be able to process two dimensionalinput images II in one step. The scaler WI supplies the output image OIwhich comprises the output samples Po. Such a scaler is usually requiredin display apparatuses which comprise a matrix display. Such a matrixdisplay has a native resolution determined by the number of pixels(display elements) in each row and the number of rows. On the otherhand, the input image II has a resolution which may differ from thenative resolution of the matrix display. Thus, the output samples Po tobe displayed on the pixels of the matrix display have to be interpolatedfrom the input samples Pi. The scaler WI may receive the input video IVto be able to interpolate each of the three signals R, G and B, ifpresent. The output video processing processes the output video OI toobtain a video drive signal VDS suitable to drive the display device DPcomprising the display screen DS.

To conclude, the preferred embodiment in accordance with the inventionis directed to a digital processor which performs the next steps in theorder given.

Interpolate 10 the input image II with a predetermined fastinterpolation method to obtain a roughly interpolated output imageI′(m,n) comprising temporary output samples Pot. The temporary outputsamples Pot are determined for the purpose of using them to calculatethe local gradient direction θ(m,n) and are not meant to be displayed.

Calculate the local gradient direction θ(m,n) in this roughlyinterpolated output image I′(m,n) with a simple algorithm such as theSobel filters 11 and 12, the divider 13 and the arctan calculator 14,but other algorithms may also be used.

Determine 21 a number of interpolated input values ai along thisgradient direction θ(m,n) from the input samples Pi(i,j) of the inputimage II in selected 20 predetermined positions located around theoutput pixel Po(m,n) we want to interpolate. Use these input values aito match the edge model of the WaDi approach by calculating 22 thewarping factor A. Use this warping factor A to calculate the warpingalong the gradient direction θ(m,n).

Project 30 the calculated warping along the gradient direction θ(m,n) onthe x and y axis, and perform a clipping 31 if necessary. Apply 32 theprojected x and y warping components on the values of the phases Sx andSy (representing the offset of the output samples Po(m,n) to beinterpolated with respect to the closest upper-left input pixelsPi(i,j)) to calculate the warped position of the output sample Po(m,n).Use 32 a linear filtering technique to interpolate the output samplevalue Po(m,n) in the warped position accordingly. The output samplesPo(m,n) are used to be displayed.

The WaDi algorithm in accordance with the invention could be used everytime an interpolation processing is required of photographic images orvideo. The algorithm performs best when scaling factors greater than 2are required. For example, the algorithm may be used in video-wallapplications, in photo-retouching software and other context. It couldalso be useful inside integrated circuits, such as, for examplecontrollers of digital display systems. The algorithm could beimplemented both in real time and batch processing applications.

It should be noted that the above-mentioned embodiments illustraterather than limit the invention, and that those skilled in the art willbe able to design many alternative embodiments without departing fromthe scope of the appended claims.

Although the WaDi processing in accordance with the invention has beendescribed for grey scale images, the same processing can be used forcolor images. If the WaDi processor receives RGB (Red, Green and Blue)input signals, the warped distances Six and SLy may be calculated byusing the luminance value determined from the RGB input signals. Thedifference is that in the last step 32, the interpolation is appliedthree times, on each one of the RGB signals separately using the samevalues of the warped distances SLx and SLy or the clipped warpeddistances SLCx, SLCy.

In the claims, any reference signs placed between parentheses shall notbe construed as limiting the claim. Use of the verb “comprise” and itsconjugations does not exclude the presence of elements or steps otherthan those stated in a claim. The article “a” or “an” preceding anelement does not exclude the presence of a plurality of such elements.The invention may be implemented by means of hardware comprising severaldistinct elements, and by means of a suitably programmed computer. Inthe device claim enumerating several means, several of these means maybe embodied by one and the same item of hardware. The mere fact thatcertain measures are recited in mutually different dependent claims doesnot indicate that a combination of these measures cannot be used toadvantage.

1. A method of interpolating sample values (f) of samples (Pi, Pot) ofan image, the method comprising: determining (1) a direction of a localgradient (θ) of the sample values (f) for a particular one of thesamples (Pi, Pot) from sample values (f) neighboring the particular oneof the samples (Pi, Pot), selecting (20) a position of interpolatorinput values (ai) in the direction of the local gradient (θ) of theparticular one of the samples (Pi, Pot), interpolating (21) theinterpolator input values (ai) for the particular one of the samples(Pi, Pot) from sample values (f) neighboring the interpolator inputvalues (ai), and determining (22) in a single step a warping factor (A)for a warped distance interpolator (3) using the interpolator inputvalues (ai).
 2. A method of interpolating sample values (f) of samples(Pi, Pot) of an image as claimed in claim 1, wherein: an output image(OI) is interpolated from an input image (II) in a system for digitallyscaling the input image (II) with input samples (Pi) having input samplevalues to obtain the output image (OI) with output samples (Po), themethod further comprises interpolating (10) the input sample values toobtain interpolated temporary output samples (Pot) having temporaryoutput sample values (I′(m,n)), the determining (1) the direction of thelocal gradient (θ) is arranged for determining a direction of the localgradient (θ) for each one of the output samples (Po) from neighboringtemporary output sample values (I′(m,n)).
 3. A method of interpolatingsample values (f) of samples (Pi, Pot) of an image as claimed in claim1, wherein: an output image (OI) is interpolated from an input image(II) in a system for digitally scaling the input image (II) with inputsamples (Pi) to obtain the output image (OI) with output samples (Po),the determining (1) the direction of the local gradient (θ) is arrangedfor determining (15) a direction of the local gradient (θ) for each oneof the input samples (Pi) from neighboring input sample values to obtaininput sample gradient values, and the method further comprises mapping(16) of the input sample gradient values to output gradient values ofthe output samples (Po), wherein the corresponding one of the outputgradient values is used as the local gradient (θ) of the particular oneof the samples (Pi, Pot).
 4. A method of interpolating sample values (f)of samples (Pi, Pot) of an image as claimed in claim 2, wherein theinput samples (Pi) and the output samples (Po) are arranged in a matrixcomprising rows of pixels in an x direction and columns of pixels in a ydirection, the determining (1) the direction of the local gradient (θ)comprises a first Sobel filtering (11) of the temporary output samples(Pot) in the x direction and a second Sobel filtering (12) in the ydirection, the local gradient (θ) of the output samples (Po) being thearctangent of the second Sobel filtering (12) divided by the first Sobelfiltering (11).
 5. A method of interpolating sample values (f) ofsamples (Pi, Pot) of an image as claimed in claim 2, wherein a distance(d) between adjacent interpolator input values (ai) is substantiallyequal to a distance between adjacent input samples (Pi).
 6. A method ofinterpolating sample values (f) of samples (Pi, Pot) of an image asclaimed in claim 2, wherein: the input samples (Pi) and the outputsamples (Po) are arranged in a matrix comprising rows of pixels in an xdirection and columns of pixels in a y direction, and the determining(22) a warping factor (A) comprises projecting (30) the warping factor(A) on a x and y axis to obtain first and second warping components (Ax,Ay), respectively, and an interpolator (32) for interpolating the inputsamples (Pi) with modified distances determined by the first and secondwarping components (Ax, Ay).
 7. A warped distance interpolator forinterpolating sample values (f) of samples (Pi, Pot) of an image, saidinterpolator comprising: means for determining (1) a direction of alocal gradient (θ) of the sample values (f) for a particular one of thesamples (Pi, Pot) from sample values (f) neighboring the particular oneof the samples (Pi, Pot), means for selecting a position (20) ofinterpolator input values (ai) in the direction of the local gradient(θ) of the particular one of the samples (Pi, Pot), means forinterpolating (21) the interpolator input values (ai) for the particularone of the samples (Pi, Po) from pixel values (f) neighboring theinterpolator input values (ai), and means for determining (22) in asingle step a warping factor (A) for a warped distance interpolator (3)using the interpolator input values (ai).
 8. A display apparatuscomprising the warped distance interpolator (3) of claim 7, and adisplay screen (DS).